package com.zhijian.warehouse.manage.service;

import com.zhijian.warehouse.manage.entity.po.AccessDoorDeploy;
import com.zhijian.warehouse.manage.entity.vo.request.AccessDoorDeploySearchVo;
import com.zhijian.warehouse.manage.entity.vo.request.AccessFacilityRecordSaveOrUpdateVo;
import com.zhijian.warehouse.manage.entity.vo.response.AccessDoorDeployVo;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import java.util.List;

/**
 * 通道门设置 业务处理层
 *
 * @author auto
 * @version 1.0
 * @date 2024-11-03 15:31:18
 */
public interface AccessOptService {


    /**
     * 新增通道门设置
     * @param build
     * @return
     */
    List<AccessDoorDeployVo> selectDoorList(AccessDoorDeploySearchVo build);

    /**
     * 保存通道门进出记录
     * @param accessDoorDeployVo
     * @param epc
     */
    void saveDoorRecord(AccessFacilityRecordSaveOrUpdateVo accessDoorDeployVo, String epc);


    /**
     * 连接通道门
     * @param accessDoorDeploy
     * @return
     */
    SseEmitter doorConnect(AccessDoorDeployVo accessDoorDeploy);


    /**
     * 关闭通道门连接
     * @param param
     */
    void closeDoorConnect(AccessDoorDeployVo param);

    /**
     * 保存通道门设置
     * @param accessDoorDeploy 修改通道门状态
     * @return
     */
    void updateDoorDeployStatus(AccessDoorDeploy accessDoorDeploy);


    /**
     * 一体机 rfid 标签结果推送
     * * @param epc
     * @param androidIp
     * @return
     */
    void aioConnect(String epc, String androidIp);

    /**
     * 连接通道门结果推送
     * @param flag
     * @param msg
     * @param doorId
     * @return
     */
    SseEmitter doorConnect(boolean flag, String msg, Long doorId);
}
